package com.org.gsc.chartdemo.bases;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

/**
 * Created by qundui on 2017/8/29.
 */
public  abstract class BaseActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
        doBusy();
    }
    protected  <T extends View>  T findView(int res){
    return (T) findViewById(res);
}
    protected abstract void doBusy();
    protected abstract int getLayoutId();
    protected  void startPage(Class<? extends Activity> c){
        startActivity(new Intent(this,c));
    }
}
